<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        #box{
            width: 200px;
            margin: 0 auto;
            text-align: center;

        }
        p{
            display: inline-block;
            line-height: 13px;
        }
        #infor{
            display: none;
        }
    </style>
</head>
<body>
    <div id="box">
        <input type="checkbox">
        <p>两周内自动登录</p>
        <div id="infor">提示</div>
    </div>
</body>
<script>
    window.onload = function(){
        var oDiv = document.getElementById('box')
        var oTips = document.getElementById('infor')
        oDiv.onmouseover = function(){
            oTips.style.display = "block"
        }
        oDiv.onmouseout = function(){
            oTips.style.display ="none"
        }
    }
</script>
</html>